import 'package:love_newf/generated/json/base/json_convert_content.dart';
import 'package:love_newf/app/com/model/app_config_model.dart';

AppConfigModel $AppConfigModelFromJson(Map<String, dynamic> json) {
  final AppConfigModel appConfigModel = AppConfigModel();
  final AppConfigVersionVO? versionVO = jsonConvert.convert<AppConfigVersionVO>(
      json['versionVO']);
  if (versionVO != null) {
    appConfigModel.versionVO = versionVO;
  }
  final AppConfigWxBindParamVO? wxBindParamVO = jsonConvert.convert<
      AppConfigWxBindParamVO>(json['wxBindParamVO']);
  if (wxBindParamVO != null) {
    appConfigModel.wxBindParamVO = wxBindParamVO;
  }
  final String? imAppId = jsonConvert.convert<String>(json['imAppId']);
  if (imAppId != null) {
    appConfigModel.imAppId = imAppId;
  }
  final String? jgAppId = jsonConvert.convert<String>(json['jgAppId']);
  if (jgAppId != null) {
    appConfigModel.jgAppId = jgAppId;
  }
  final String? jgAppSign = jsonConvert.convert<String>(json['jgAppSign']);
  if (jgAppSign != null) {
    appConfigModel.jgAppSign = jgAppSign;
  }
  final String? baiduAccessToken = jsonConvert.convert<String>(
      json['baiduAccessToken']);
  if (baiduAccessToken != null) {
    appConfigModel.baiduAccessToken = baiduAccessToken;
  }
  final String? wxPublicUrl = jsonConvert.convert<String>(json['wxPublicUrl']);
  if (wxPublicUrl != null) {
    appConfigModel.wxPublicUrl = wxPublicUrl;
  }
  final List<AppConfigAdminUsers>? adminUsers = (json['adminUsers'] as List<
      dynamic>?)
      ?.map(
          (e) =>
      jsonConvert.convert<AppConfigAdminUsers>(e) as AppConfigAdminUsers)
      .toList();
  if (adminUsers != null) {
    appConfigModel.adminUsers = adminUsers;
  }
  final AppConfigOssParamsVO? ossParamsVO = jsonConvert.convert<
      AppConfigOssParamsVO>(json['ossParamsVO']);
  if (ossParamsVO != null) {
    appConfigModel.ossParamsVO = ossParamsVO;
  }
  final int? yellowCheckCycle = jsonConvert.convert<int>(
      json['yellowCheckCycle']);
  if (yellowCheckCycle != null) {
    appConfigModel.yellowCheckCycle = yellowCheckCycle;
  }
  final String? yellowCheckUploadUrl = jsonConvert.convert<String>(
      json['yellowCheckUploadUrl']);
  if (yellowCheckUploadUrl != null) {
    appConfigModel.yellowCheckUploadUrl = yellowCheckUploadUrl;
  }
  final String? xxBase64 = jsonConvert.convert<String>(json['xxBase64']);
  if (xxBase64 != null) {
    appConfigModel.xxBase64 = xxBase64;
  }
  final int? autoClose = jsonConvert.convert<int>(json['autoClose']);
  if (autoClose != null) {
    appConfigModel.autoClose = autoClose;
  }
  final int? autoCloseInterval = jsonConvert.convert<int>(
      json['autoCloseInterval']);
  if (autoCloseInterval != null) {
    appConfigModel.autoCloseInterval = autoCloseInterval;
  }
  final int? isGiftPreCached = jsonConvert.convert<int>(
      json['isGiftPreCached']);
  if (isGiftPreCached != null) {
    appConfigModel.isGiftPreCached = isGiftPreCached;
  }
  final int? giftCacheMode = jsonConvert.convert<int>(json['giftCacheMode']);
  if (giftCacheMode != null) {
    appConfigModel.giftCacheMode = giftCacheMode;
  }
  final List<AppConfigTipsVOS>? tipsVOS = (json['tipsVOS'] as List<dynamic>?)
      ?.map(
          (e) => jsonConvert.convert<AppConfigTipsVOS>(e) as AppConfigTipsVOS)
      .toList();
  if (tipsVOS != null) {
    appConfigModel.tipsVOS = tipsVOS;
  }
  final AppConfigLiuMaVO3? liuMaVO3 = jsonConvert.convert<AppConfigLiuMaVO3>(
      json['liuMaVO3']);
  if (liuMaVO3 != null) {
    appConfigModel.liuMaVO3 = liuMaVO3;
  }
  final AppConfigLiuMaVO7? liuMaVO7 = jsonConvert.convert<AppConfigLiuMaVO7>(
      json['liuMaVO7']);
  if (liuMaVO7 != null) {
    appConfigModel.liuMaVO7 = liuMaVO7;
  }
  final AppConfigLiuMaVO9? liuMaVO9 = jsonConvert.convert<AppConfigLiuMaVO9>(
      json['liuMaVO9']);
  if (liuMaVO9 != null) {
    appConfigModel.liuMaVO9 = liuMaVO9;
  }
  return appConfigModel;
}

Map<String, dynamic> $AppConfigModelToJson(AppConfigModel entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['versionVO'] = entity.versionVO.toJson();
  data['wxBindParamVO'] = entity.wxBindParamVO.toJson();
  data['imAppId'] = entity.imAppId;
  data['jgAppId'] = entity.jgAppId;
  data['jgAppSign'] = entity.jgAppSign;
  data['baiduAccessToken'] = entity.baiduAccessToken;
  data['wxPublicUrl'] = entity.wxPublicUrl;
  data['adminUsers'] = entity.adminUsers.map((v) => v.toJson()).toList();
  data['ossParamsVO'] = entity.ossParamsVO.toJson();
  data['yellowCheckCycle'] = entity.yellowCheckCycle;
  data['yellowCheckUploadUrl'] = entity.yellowCheckUploadUrl;
  data['xxBase64'] = entity.xxBase64;
  data['autoClose'] = entity.autoClose;
  data['autoCloseInterval'] = entity.autoCloseInterval;
  data['isGiftPreCached'] = entity.isGiftPreCached;
  data['giftCacheMode'] = entity.giftCacheMode;
  data['tipsVOS'] = entity.tipsVOS.map((v) => v.toJson()).toList();
  data['liuMaVO3'] = entity.liuMaVO3.toJson();
  data['liuMaVO7'] = entity.liuMaVO7.toJson();
  data['liuMaVO9'] = entity.liuMaVO9.toJson();
  return data;
}

extension AppConfigModelExtension on AppConfigModel {
  AppConfigModel copyWith({
    AppConfigVersionVO? versionVO,
    AppConfigWxBindParamVO? wxBindParamVO,
    String? imAppId,
    String? jgAppId,
    String? jgAppSign,
    String? baiduAccessToken,
    String? wxPublicUrl,
    List<AppConfigAdminUsers>? adminUsers,
    AppConfigOssParamsVO? ossParamsVO,
    int? yellowCheckCycle,
    String? yellowCheckUploadUrl,
    String? xxBase64,
    int? autoClose,
    int? autoCloseInterval,
    int? isGiftPreCached,
    int? giftCacheMode,
    List<AppConfigTipsVOS>? tipsVOS,
    AppConfigLiuMaVO3? liuMaVO3,
    AppConfigLiuMaVO7? liuMaVO7,
    AppConfigLiuMaVO9? liuMaVO9,
  }) {
    return AppConfigModel()
      ..versionVO = versionVO ?? this.versionVO
      ..wxBindParamVO = wxBindParamVO ?? this.wxBindParamVO
      ..imAppId = imAppId ?? this.imAppId
      ..jgAppId = jgAppId ?? this.jgAppId
      ..jgAppSign = jgAppSign ?? this.jgAppSign
      ..baiduAccessToken = baiduAccessToken ?? this.baiduAccessToken
      ..wxPublicUrl = wxPublicUrl ?? this.wxPublicUrl
      ..adminUsers = adminUsers ?? this.adminUsers
      ..ossParamsVO = ossParamsVO ?? this.ossParamsVO
      ..yellowCheckCycle = yellowCheckCycle ?? this.yellowCheckCycle
      ..yellowCheckUploadUrl = yellowCheckUploadUrl ?? this.yellowCheckUploadUrl
      ..xxBase64 = xxBase64 ?? this.xxBase64
      ..autoClose = autoClose ?? this.autoClose
      ..autoCloseInterval = autoCloseInterval ?? this.autoCloseInterval
      ..isGiftPreCached = isGiftPreCached ?? this.isGiftPreCached
      ..giftCacheMode = giftCacheMode ?? this.giftCacheMode
      ..tipsVOS = tipsVOS ?? this.tipsVOS
      ..liuMaVO3 = liuMaVO3 ?? this.liuMaVO3
      ..liuMaVO7 = liuMaVO7 ?? this.liuMaVO7
      ..liuMaVO9 = liuMaVO9 ?? this.liuMaVO9;
  }
}

AppConfigVersionVO $AppConfigVersionVOFromJson(Map<String, dynamic> json) {
  final AppConfigVersionVO appConfigVersionVO = AppConfigVersionVO();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    appConfigVersionVO.id = id;
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    appConfigVersionVO.title = title;
  }
  final String? url = jsonConvert.convert<String>(json['url']);
  if (url != null) {
    appConfigVersionVO.url = url;
  }
  final int? forces = jsonConvert.convert<int>(json['forces']);
  if (forces != null) {
    appConfigVersionVO.forces = forces;
  }
  final String? description = jsonConvert.convert<String>(json['description']);
  if (description != null) {
    appConfigVersionVO.description = description;
  }
  final String? version = jsonConvert.convert<String>(json['version']);
  if (version != null) {
    appConfigVersionVO.version = version;
  }
  final bool? force = jsonConvert.convert<bool>(json['force']);
  if (force != null) {
    appConfigVersionVO.force = force;
  }
  return appConfigVersionVO;
}

Map<String, dynamic> $AppConfigVersionVOToJson(AppConfigVersionVO entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['title'] = entity.title;
  data['url'] = entity.url;
  data['forces'] = entity.forces;
  data['description'] = entity.description;
  data['version'] = entity.version;
  data['force'] = entity.force;
  return data;
}

extension AppConfigVersionVOExtension on AppConfigVersionVO {
  AppConfigVersionVO copyWith({
    int? id,
    String? title,
    String? url,
    int? forces,
    String? description,
    String? version,
    bool? force,
  }) {
    return AppConfigVersionVO()
      ..id = id ?? this.id
      ..title = title ?? this.title
      ..url = url ?? this.url
      ..forces = forces ?? this.forces
      ..description = description ?? this.description
      ..version = version ?? this.version
      ..force = force ?? this.force;
  }
}

AppConfigWxBindParamVO $AppConfigWxBindParamVOFromJson(
    Map<String, dynamic> json) {
  final AppConfigWxBindParamVO appConfigWxBindParamVO = AppConfigWxBindParamVO();
  final String? appid = jsonConvert.convert<String>(json['appid']);
  if (appid != null) {
    appConfigWxBindParamVO.appid = appid;
  }
  final String? scope = jsonConvert.convert<String>(json['scope']);
  if (scope != null) {
    appConfigWxBindParamVO.scope = scope;
  }
  return appConfigWxBindParamVO;
}

Map<String, dynamic> $AppConfigWxBindParamVOToJson(
    AppConfigWxBindParamVO entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['appid'] = entity.appid;
  data['scope'] = entity.scope;
  return data;
}

extension AppConfigWxBindParamVOExtension on AppConfigWxBindParamVO {
  AppConfigWxBindParamVO copyWith({
    String? appid,
    String? scope,
  }) {
    return AppConfigWxBindParamVO()
      ..appid = appid ?? this.appid
      ..scope = scope ?? this.scope;
  }
}

AppConfigAdminUsers $AppConfigAdminUsersFromJson(Map<String, dynamic> json) {
  final AppConfigAdminUsers appConfigAdminUsers = AppConfigAdminUsers();
  final int? userId = jsonConvert.convert<int>(json['userId']);
  if (userId != null) {
    appConfigAdminUsers.userId = userId;
  }
  return appConfigAdminUsers;
}

Map<String, dynamic> $AppConfigAdminUsersToJson(AppConfigAdminUsers entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['userId'] = entity.userId;
  return data;
}

extension AppConfigAdminUsersExtension on AppConfigAdminUsers {
  AppConfigAdminUsers copyWith({
    int? userId,
  }) {
    return AppConfigAdminUsers()
      ..userId = userId ?? this.userId;
  }
}

AppConfigOssParamsVO $AppConfigOssParamsVOFromJson(Map<String, dynamic> json) {
  final AppConfigOssParamsVO appConfigOssParamsVO = AppConfigOssParamsVO();
  final String? endPoint = jsonConvert.convert<String>(json['endPoint']);
  if (endPoint != null) {
    appConfigOssParamsVO.endPoint = endPoint;
  }
  final String? accessKeyId = jsonConvert.convert<String>(json['accessKeyId']);
  if (accessKeyId != null) {
    appConfigOssParamsVO.accessKeyId = accessKeyId;
  }
  final String? accessKeySecret = jsonConvert.convert<String>(
      json['accessKeySecret']);
  if (accessKeySecret != null) {
    appConfigOssParamsVO.accessKeySecret = accessKeySecret;
  }
  final String? bucketName = jsonConvert.convert<String>(json['bucketName']);
  if (bucketName != null) {
    appConfigOssParamsVO.bucketName = bucketName;
  }
  return appConfigOssParamsVO;
}

Map<String, dynamic> $AppConfigOssParamsVOToJson(AppConfigOssParamsVO entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['endPoint'] = entity.endPoint;
  data['accessKeyId'] = entity.accessKeyId;
  data['accessKeySecret'] = entity.accessKeySecret;
  data['bucketName'] = entity.bucketName;
  return data;
}

extension AppConfigOssParamsVOExtension on AppConfigOssParamsVO {
  AppConfigOssParamsVO copyWith({
    String? endPoint,
    String? accessKeyId,
    String? accessKeySecret,
    String? bucketName,
  }) {
    return AppConfigOssParamsVO()
      ..endPoint = endPoint ?? this.endPoint
      ..accessKeyId = accessKeyId ?? this.accessKeyId
      ..accessKeySecret = accessKeySecret ?? this.accessKeySecret
      ..bucketName = bucketName ?? this.bucketName;
  }
}

AppConfigTipsVOS $AppConfigTipsVOSFromJson(Map<String, dynamic> json) {
  final AppConfigTipsVOS appConfigTipsVOS = AppConfigTipsVOS();
  final int? scene = jsonConvert.convert<int>(json['scene']);
  if (scene != null) {
    appConfigTipsVOS.scene = scene;
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    appConfigTipsVOS.title = title;
  }
  final String? content = jsonConvert.convert<String>(json['content']);
  if (content != null) {
    appConfigTipsVOS.content = content;
  }
  return appConfigTipsVOS;
}

Map<String, dynamic> $AppConfigTipsVOSToJson(AppConfigTipsVOS entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['scene'] = entity.scene;
  data['title'] = entity.title;
  data['content'] = entity.content;
  return data;
}

extension AppConfigTipsVOSExtension on AppConfigTipsVOS {
  AppConfigTipsVOS copyWith({
    int? scene,
    String? title,
    String? content,
  }) {
    return AppConfigTipsVOS()
      ..scene = scene ?? this.scene
      ..title = title ?? this.title
      ..content = content ?? this.content;
  }
}

AppConfigLiuMaVO3 $AppConfigLiuMaVO3FromJson(Map<String, dynamic> json) {
  final AppConfigLiuMaVO3 appConfigLiuMaVO3 = AppConfigLiuMaVO3();
  final String? width = jsonConvert.convert<String>(json['width']);
  if (width != null) {
    appConfigLiuMaVO3.width = width;
  }
  final String? length = jsonConvert.convert<String>(json['length']);
  if (length != null) {
    appConfigLiuMaVO3.length = length;
  }
  final String? codeRate = jsonConvert.convert<String>(json['codeRate']);
  if (codeRate != null) {
    appConfigLiuMaVO3.codeRate = codeRate;
  }
  final String? frameRate = jsonConvert.convert<String>(json['frameRate']);
  if (frameRate != null) {
    appConfigLiuMaVO3.frameRate = frameRate;
  }
  final String? scale = jsonConvert.convert<String>(json['scale']);
  if (scale != null) {
    appConfigLiuMaVO3.scale = scale;
  }
  return appConfigLiuMaVO3;
}

Map<String, dynamic> $AppConfigLiuMaVO3ToJson(AppConfigLiuMaVO3 entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['width'] = entity.width;
  data['length'] = entity.length;
  data['codeRate'] = entity.codeRate;
  data['frameRate'] = entity.frameRate;
  data['scale'] = entity.scale;
  return data;
}

extension AppConfigLiuMaVO3Extension on AppConfigLiuMaVO3 {
  AppConfigLiuMaVO3 copyWith({
    String? width,
    String? length,
    String? codeRate,
    String? frameRate,
    String? scale,
  }) {
    return AppConfigLiuMaVO3()
      ..width = width ?? this.width
      ..length = length ?? this.length
      ..codeRate = codeRate ?? this.codeRate
      ..frameRate = frameRate ?? this.frameRate
      ..scale = scale ?? this.scale;
  }
}

AppConfigLiuMaVO7 $AppConfigLiuMaVO7FromJson(Map<String, dynamic> json) {
  final AppConfigLiuMaVO7 appConfigLiuMaVO7 = AppConfigLiuMaVO7();
  final String? width = jsonConvert.convert<String>(json['width']);
  if (width != null) {
    appConfigLiuMaVO7.width = width;
  }
  final String? length = jsonConvert.convert<String>(json['length']);
  if (length != null) {
    appConfigLiuMaVO7.length = length;
  }
  final String? codeRate = jsonConvert.convert<String>(json['codeRate']);
  if (codeRate != null) {
    appConfigLiuMaVO7.codeRate = codeRate;
  }
  final String? frameRate = jsonConvert.convert<String>(json['frameRate']);
  if (frameRate != null) {
    appConfigLiuMaVO7.frameRate = frameRate;
  }
  final String? scale = jsonConvert.convert<String>(json['scale']);
  if (scale != null) {
    appConfigLiuMaVO7.scale = scale;
  }
  return appConfigLiuMaVO7;
}

Map<String, dynamic> $AppConfigLiuMaVO7ToJson(AppConfigLiuMaVO7 entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['width'] = entity.width;
  data['length'] = entity.length;
  data['codeRate'] = entity.codeRate;
  data['frameRate'] = entity.frameRate;
  data['scale'] = entity.scale;
  return data;
}

extension AppConfigLiuMaVO7Extension on AppConfigLiuMaVO7 {
  AppConfigLiuMaVO7 copyWith({
    String? width,
    String? length,
    String? codeRate,
    String? frameRate,
    String? scale,
  }) {
    return AppConfigLiuMaVO7()
      ..width = width ?? this.width
      ..length = length ?? this.length
      ..codeRate = codeRate ?? this.codeRate
      ..frameRate = frameRate ?? this.frameRate
      ..scale = scale ?? this.scale;
  }
}

AppConfigLiuMaVO9 $AppConfigLiuMaVO9FromJson(Map<String, dynamic> json) {
  final AppConfigLiuMaVO9 appConfigLiuMaVO9 = AppConfigLiuMaVO9();
  final String? width = jsonConvert.convert<String>(json['width']);
  if (width != null) {
    appConfigLiuMaVO9.width = width;
  }
  final String? length = jsonConvert.convert<String>(json['length']);
  if (length != null) {
    appConfigLiuMaVO9.length = length;
  }
  final String? codeRate = jsonConvert.convert<String>(json['codeRate']);
  if (codeRate != null) {
    appConfigLiuMaVO9.codeRate = codeRate;
  }
  final String? frameRate = jsonConvert.convert<String>(json['frameRate']);
  if (frameRate != null) {
    appConfigLiuMaVO9.frameRate = frameRate;
  }
  final String? scale = jsonConvert.convert<String>(json['scale']);
  if (scale != null) {
    appConfigLiuMaVO9.scale = scale;
  }
  return appConfigLiuMaVO9;
}

Map<String, dynamic> $AppConfigLiuMaVO9ToJson(AppConfigLiuMaVO9 entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['width'] = entity.width;
  data['length'] = entity.length;
  data['codeRate'] = entity.codeRate;
  data['frameRate'] = entity.frameRate;
  data['scale'] = entity.scale;
  return data;
}

extension AppConfigLiuMaVO9Extension on AppConfigLiuMaVO9 {
  AppConfigLiuMaVO9 copyWith({
    String? width,
    String? length,
    String? codeRate,
    String? frameRate,
    String? scale,
  }) {
    return AppConfigLiuMaVO9()
      ..width = width ?? this.width
      ..length = length ?? this.length
      ..codeRate = codeRate ?? this.codeRate
      ..frameRate = frameRate ?? this.frameRate
      ..scale = scale ?? this.scale;
  }
}